package com.example.demo.util;

import java.util.Random;

import org.springframework.context.annotation.Configuration;

@Configuration
public class CodeUtil {
	public String getCode () {
		String string = "0123456789qwertyuiopasdfghjkzxcvbnmQWERTYUIOP";
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < 4; i++) {
			sb.append(string.charAt(new Random().nextInt(string.length())));
		}
		return sb.toString();
	}
}
